import React, { Component } from 'react'
import BaseBlock from './BaseBlock'

const sty_father = {display: "flex", flexDirection: "row", flexWrap: "wrap", alignContent: "flex-start"};
const sty_child = {flex: "0, 0 , 100px"};
export default class Memery extends Component {
  constructor(props) {
    super(props);
    this.state = {
    };
  }
  render() {
    return (
      <div style={sty_father}>
        {this.props.list.map((value, index) => {
          return (
              <BaseBlock
                key={`${value}${index}`}
                getTarget={() => {this.getTarget()}}
                getInfo={() => {this.getInfo()}}
                style={sty_child}
                target={this.props.target}
                index={index}
                status={value}
              />
            );
          })}
      </div>
    )
  }
  getTarget = (val) => {
    console.log('getTarget', val);
  }
  getInfo = (val) => {
    console.log('getInfo', val);
  }
}
